package com.pg.agent.engine.client.model.agent;

import com.alibaba.fastjson.JSONObject;
import com.pg.agent.engine.client.bo.CurrentComponentBO;
import com.pg.agent.engine.client.component.APIComponent;
import com.pg.agent.engine.client.component.BubbleComponent;
import com.pg.agent.engine.client.component.Prompt;
import com.pg.agent.engine.client.model.InParam;
import com.pg.agent.engine.client.model.llm.ComponentLLM;
import com.pg.agent.engine.client.model.sop.Memory;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Slf4j
@Data
public class AIAgent implements Serializable {
    private static final long serialVersionUID = 9120606095133429208L;
    /**
     * sopId
     */
    private Long id;
    /**
     * agent名称
     */
    private String name;
    /**
     * agent角色
     */
    private String role;

    /**
     * agent 风格
     */
    private String style;

    /**
     * 指令
     */
    private String prompt;

    /**
     * 执行参数
     */
    private Map<String, Object> paramMap;

    /**
     * 组件入参
     */
    private Map<String, JSONObject> componentInParam;


    /**
     * 组件大模型
     */
    private ComponentLLM comLLM;

    /**
     * 是否是用户
     */
    private boolean isUser;

    /**
     * 长记忆
     */
    private List<Memory> longTermMemory = new ArrayList<>();

    /**
     * 观察记忆
     */
    private Memory observeMemory;

    /**
     * 短记忆
     */
    private String shortTermMemory;


    /**
     * 当前角色
     */
    private String currentRole;
    /**
     * 关联记忆
     */
    private String relevantMemory;


    /**
     * 是否是第一次说话
     */
    private boolean firstSpeak;

    /**
     * agentTask
     */
    private String agentRoleDesc;

    /**
     * 智能体组件集合
     */
    private List<Prompt> PromptComponentList;
    /**
     * API组件
     */
    private List<APIComponent> apiComponentList = new ArrayList<>();


    /**
     * 执行过的组件列表
     */
    private List<Long> execComList = new ArrayList<>();

    /**
     * 组件的执行结果
     */
    private Map<Long, JSONObject> componentResult = new HashMap<>();

    /**
     * 执行组件时的入参
     */
    private Map<Long, Map<Long,List<InParam>>> execComponentInParam = new HashMap<>();

    /**
     * 当前执行的组件
     */
    private CurrentComponentBO currentComponent;


    private String response;

    /**
     * 返回数据用到的组件参数
     */
    private List<ComponentParam> componentParamList = new ArrayList<>();

    private List<BubbleComponent> bubbleComponentList;



}
